load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "ingestrec",
    srcs = ["ingest_recorder.go"],
    importpath = "github.com/pingcap/tidb/br/pkg/restore/ingestrec",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/infoschema",
        "//pkg/meta/model",
        "//pkg/parser/model",
        "//pkg/types",
        "@com_github_pingcap_errors//:errors",
        "@com_github_pingcap_log//:log",
        "@org_uber_go_zap//:zap",
    ],
)

go_test(
    name = "ingestrec_test",
    timeout = "short",
    srcs = ["ingest_recorder_test.go"],
    flaky = True,
    shard_count = 3,
    deps = [
        ":ingestrec",
        "//pkg/kv",
        "//pkg/meta",
        "//pkg/meta/model",
        "//pkg/parser/model",
        "//pkg/session",
        "//pkg/store/mockstore",
        "@com_github_pingcap_errors//:errors",
        "@com_github_stretchr_testify//require",
    ],
)
